package com.heima.client;

import com.heima.common.dto.ResponseResult;
import com.heima.domain.ApAuthor;
import com.heima.domain.ArticleDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//文章微服务暴露接口
@FeignClient("leadnews-article")
public interface ArticleClient {

    //保存文章作者
    @PostMapping("/api/v1/author")
    ResponseResult<ApAuthor> saveApAuthor(@RequestBody ApAuthor apAuthor);

    //保存文章
    @PostMapping("/api/v1/article")
    public ResponseResult<Long> saveArticle(@RequestBody ArticleDto dto);
}